from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    # 大华平台配置
    DAHUA_API_HOST: str = "http://localhost:8002"
    DAHUA_APP_KEY: str = "mock_app_key"
    DAHUA_APP_SECRET: str = "mock_app_secret"
    
    # 海康平台配置
    HIKVISION_API_HOST: str = "http://localhost:8002"
    HIKVISION_APP_KEY: str = "mock_app_key"
    HIKVISION_APP_SECRET: str = "mock_app_secret"
    
    # 事件回调配置
    EVENT_CALLBACK_URL: str = "http://localhost:8003/api/callbacks"
    
    # 数据库配置
    DATABASE_URL: str = "mysql+pymysql://root:password@localhost/door_access"
    
    # Redis配置
    REDIS_HOST: str = "localhost"
    REDIS_PORT: int = 6379
    REDIS_DB: int = 0
    
    # 应用配置
    DEBUG: bool = True
    SECRET_KEY: str = "your-secret-key"
    
    class Config:
        env_file = ".env"
        env_file_encoding = "utf-8"

# 创建全局配置实例
settings = Settings()
